function encode(content,sessionKey,ivalue){
  var mode = new Crypto.mode.CBC(Crypto.pad.pkcs7);
  var eb = Crypto.charenc.UTF8.stringToBytes(content);
  var kb = Crypto.charenc.UTF8.stringToBytes(sessionKey);//KEY
  var vb = Crypto.charenc.UTF8.stringToBytes(ivalue);//IV
  var ub = Crypto.AES.encrypt(eb, kb, { iv: vb, mode: mode, asBpytes: true });
  return ub;
}

function decode(content,sessionKey,ivalue){
  var mode = new Crypto.mode.CBC(Crypto.pad.pkcs7);
  var eb = Crypto.util.base64ToBytes(content);
  var kb = Crypto.charenc.UTF8.stringToBytes(sessionKey);//KEY
  var vb = Crypto.charenc.UTF8.stringToBytes(ivalue);//IV
  var ub = Crypto.AES.decrypt(eb, kb, { asBpytes: true, mode: mode, iv: vb });
  return ub;
}

module.exports.encode = encode
module.exports.decode = decode